<?php
require_once __DIR__ . '/dumpHelper.php';
?>

<div id="dump">
    <h2><?php echo $data->get('title'); ?></h2>
    <?php if (count($data->get('dumps', '/', array())) > 0): ?>
    <table>
        <tr>
            <th>No.</th>
            <th>Message</th>
            <th>Dump</th>
        </tr>
        <?php foreach ($data->get('dumps', '/', array()) as $index => $message): ?>
        <tr>
            <td><?php echo $index+1; ?>.</td>
            <td><?php echo htmlspecialchars($message); ?></td>
            <td><?php echo dump($message->getVariable());  ?></td>
        </tr>
        <?php endforeach; ?>
    </table>
    <?php else: ?>
    No dumps available
    <?php endif; ?>
</div>